package com.wondersgroup.restbase.exception;

/**
 * 业务异常类
 * 
 * @author wondersgroup
 *
 */
public class BusinessException extends RuntimeException {

	/**
	* 
	*/
	private static final long serialVersionUID = -3588373084765986889L;

	/**
	 * 根据异常信息构造异常对象
	 * 
	 * @param message 异常信息
	 */
	public BusinessException(String message) {
		super(message);
	}

	/**
	 * 根据异常代码和异常信息构造异常对象
	 * 
	 * @param code 异常代码
	 * @param message 异常信息
	 */
	public BusinessException(String code, String message) {
		super("{\"code\":\"" + code + "\",\"message\":\"" + message + "\"}");
	}
}
